Dynamic response prediction for improved bot task processing

ABSTRACT

Systems and methods can be provided for predicting responses during communication sessions with network devices. In some implementations, systems and methods can facilitate predicting responses using machine learning techniques. Messages received through a platform can be stored in a repository. A machine learning model may be trained using the stored messages. When a terminal device is communicating with a network device in a communication session, the messages exchanged in the communication session and the machine learning model can be used to predict future responses in real-time. The predicted future responses can be presented at the terminal device. A predicted response can be selected at the terminal device. Upon selection, the selected predicted response is transmitted to the network device during the communication session.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims the priority benefit of each of (1) U.S.Provisional Patent Application No. 62/502,535, filed on May 5, 2017, and(2) U.S. Provisional Patent Application No. 62/502,572, filed on May 5,2017, the disclosures of each of which are hereby incorporated byreference in its entirety for all purposes.

FIELD

The present disclosure relates generally to facilitating routing ofcommunications. More specifically, techniques are provided todynamically routing messages between bots and terminal devices duringcommunication sessions configured with multi-channel capabilities.

BACKGROUND

Bot scripts can be executed to automate data processing and taskmanagement. However, as the amount of data grows in scale and becomesincreasingly dynamic and complex, traditional bot scripts exhibit asignificant lack of efficiency. Configuring bot scripts to correctlydetect target outcomes for task management is often challenging.Further, bot scripts may erroneously process tasks in a queue, and as aresult, overall system load can become unbalanced or processingresources can become unduly burdened. Bot scripts are also typicallyincapable of processing tasks across multiple different environments.

SUMMARY

The term embodiment and like terms are intended to refer broadly to allof the subject matter of this disclosure and the claims below.Statements containing these terms should be understood not to limit thesubject matter described herein or to limit the meaning or scope of theclaims below. Embodiments of the present disclosure covered herein aredefined by the claims below, not this summary. This summary is ahigh-level overview of various aspects of the disclosure and introducessome of the concepts that are further described in the DetailedDescription section below. This summary is not intended to identify keyor essential features of the claimed subject matter, nor is it intendedto be used in isolation to determine the scope of the claimed subjectmatter. The subject matter should be understood by reference toappropriate portions of the entire specification of this disclosure, anyor all drawings and each claim.

Embodiments of the present disclosure provide technical solutions toaddress the technical challenges presented above. For example, a bot(e.g., a bot script executing using a processor) may be configured toroute data packets (e.g., communications, messages including content,signals, and the like) between network devices and terminal devices.Bots may be configured to be coding language agnostic. For example, botsmay be coded to use Application Programming Interfaces (APIs) tointeraction with systems, and therefore, may be coded in any languagewhich is capable of making API calls. As the scale of messages to berouted grows (e.g., to big-data levels of scale and complexity), the botmay incorrectly route a message to a destination system. As anon-limiting example, bots may evaluate content of a communication(e.g., a message in a communication session) received from a networkdevice to determine a destination for the communication. The evaluationmay cause the bot to route the communication to a terminal device basedon a previous routing instance. However, the target destination (e.g., aterminal device operated by an agent) may be different from thedestination that received the communication in the previous routinginstance. One reason may be the context of the communication as comparedto previous communications from that network device. Incorrect routingcan cause the network or system load to become unbalanced, andunbalanced system load may cause unnecessary burdens to processingresources (e.g., servers may overload and fail to operate, queues maybecome overloaded causing delay, and so on). Certain embodiments of thepresent disclosure provide artificial intelligence techniques and/ormachine learning techniques that continuously monitor the accuracy ofbot-based routing and provide feedback signals to enhance the bots'accuracy, as needed. In the above-described scenario, for example,artificial intelligence techniques and/or machine learning techniquescan be implemented to enhance the bot's accuracy of future routinginstances based on machine-learning models.

Certain embodiments relate to systems and methods for dynamicallyswitching between bots and terminal devices (e.g., operated by liveagents) during communication sessions between network devices (e.g.,user devices operated by users) and the terminal devices. In someimplementations, bots can be configured to autonomously communicate withnetwork devices. Further, bots can be configured for a specificcapability. Non-limiting examples of capabilities can includeintelligently routing communications to target destinations, modifyingdata stored in databases, providing updates to users, providingadditional information about the user to agents, determining a user'sintent and routing the user to a destination system based on the intent,predicting or suggesting responses to agents communicating with users,and escalating communication sessions between bots and one or moreterminal devices. In some implementations, while a bot is communicatingwith a network device in a communication session (e.g., a Short MessageService (SMS), in-app chat feature of a native application, or web-basedchat session), a communication server can automatically and dynamicallydetermine to transfer the chat session to a terminal device associatedwith an agent. For example, bots can communicate with network devicesabout certain tasks (e.g., tasks, such as receiving updated informationand updating a record stored in a database), whereas, terminal devicescan communicate with network devices regarding more difficult tasks(e.g., solving a technical issue). In a single communication session,the bot, which may be communicating with a user, a communication servercan dynamically switch between the bot and a terminal device, so thatthe terminal device can communicate with the network device in lieu ofor in addition to the bot. Advantageously, the communication session candynamically switch between the bot and the terminal device to improvethe balance of tasks associated with the terminal device.

In some implementations, bots can be configured to automatically andautonomously process tasks in and/or across multiple environments. As anon-limiting example, a communication server may be configured toestablish or facilitate the establishment of an SMS text-basedcommunication channel between a mobile device operated by a user (e.g.,the network device) and a desktop computer operated by an agent (e.g.,the terminal device). The communication server can transform inputreceived from the desktop computer (e.g., key strokes) to SMS textmessages and transmit the SMS text message to the user's mobile phone.During the communication session, a bot may assist the agent incommunicating with the user, or the bot may take control of theconversation and communicate directly with the user using thecommunication channel. However, during the conversation between theagent (or bot) and the user, the user may indicate that he or she wouldlike to continue communicating using a different communication channel,for example, a native application with chat messaging capability,instead of the SMS application currently being used. The communicationserver may automatically detect the user's indication to changecommunication channels. Further, the communication server mayautomatically transmit a message from the native application to theuser's mobile phone to continue the conversion over the newcommunication channel (e.g., the chat communication session using thenative application chat capability). In some implementations, theindication that the user would like to change communication channels(while continuing the existing communication session) may beautomatically detected when the communication server receives a messagefrom the mobile device through the native application. Receiving amessage using a new communication channel (e.g., different from anexisting communication channel used during an existing communicationsession) may notify the communication server to continue thecommunication session on the new communication channel. Advantageously,the communication server can support continuity between variouscommunication channels by continuing a communication sessionautonomously and automatically across different communication channels.

In some implementations, the communication server may include or accessa message recommendation system to recommend response messages toterminal devices. For example, during a communication session, themessage recommendation system may continuously evaluate the messagesreceived from the network device and/or the messages transmitted by theterminal device. The content of the message may be evaluated usingmachine-learning techniques to predict a response message forrecommending to the terminal device operated by the agent. In someimplementations, a plurality of previous messages (received from anynetwork device or transmitted by any terminal device) may be stored in adatabase. Machine-learning algorithms may be executed using the messagesstored in the database to identify patterns within the stored messages(e.g., one or more clustering techniques may be used to cluster messageswith certain similarities). All or less than all of the messages may betagged with an attribute. For example, an attribute tag may be code thatis appended to a message (or otherwise stored in association with themessage), and the attribute tag may be a characteristic of the contentof the message. In some examples, the tag may be a particular string ofcode that is appended to the message. In some implementations,supervised machine-learning techniques may be used to train a model thatrecommends a response message to a particular message based on thetagged messages.

In some implementations, as the terminal device associated with theagent communicates with the network device during a communicationsession, the message recommendation system can query database(s) toprovide the agent with additional data. For example, during acommunication session, the network device may transmit a communication,indicating that the user (operating the network device) is experiencinga technical issue with a particular device. As the message is receivedat the communication server, the message recommendation system evaluatesthe message to determine that the technical issue corresponds to theparticular device. For example, text-based evaluation may be performedby the communication server to determine the content of the message, Themessage recommendation system can automatically and autonomously query adatabase for technical documents relating to the particular device. Theresults of the query can automatically be displayed on the terminaldevice to assist the agent in responding to the user. Advantageously,the message recommendation system can automatically, autonomously, andcontinuously query databases as messages are received at thecommunication server during communication sessions.

In some implementations, determining whether to transfer a communicationsession between a bot and a terminal device can be based on an analysisof one or more characteristics of the communications exchanged duringthe communication session. Further, a dynamic sentiment parameter (e.g.,a score, a numerical or letter value, etc.) can be generated torepresent the intent or sentiment associated with a receivedcommunication. For example, in cases where the sentiment parameterindicates that the user is frustrated with the bot, the system canautomatically switch the bot with a terminal device operated by a liveagent to communicate with the user. In some examples, determiningwhether to switch between the bot and the terminal device can beperformed without a prompt from a user. The determination can beperformed automatically at the communication server based any number offactors, including characteristics of the current messages in thecommunication session, characteristics of previous messages transmittedby the network device in previous communication sessions,characteristics of a real-time sentiment detected from the networkdevice's messages or a trajectory of a changing sentiment ascommunications are exchanged during the communication session, oradditional information associated with the user (e.g., profileinformation, preference information, and other suitable informationassociated with the user).

Certain embodiments of the present disclosure include acomputer-implemented method. The method may include collecting a dataset for training a machine-learning model to predict response messages.Collecting the data set may include storing one or more previousmessages included in a previous communication session between a networkdevice and a terminal device associated with an agent. The method mayinclude facilitating a communication session between a terminal deviceand a network device and receiving a new message during thecommunication session. The communication session may enable the terminaldevice and the network device to exchange one or more messages. Themethod may also include evaluating the new message using the trainedmachine-learning model. For example, evaluating the new message mayinclude evaluating any messages exchanged before the new message wasreceived. The method may also include predicting a response to the newmessage. Predicting the response includes using a result of theevaluation to determine which previous message to select from the dataset as the predicted response to the new message. The method may alsoinclude facilitating displaying the predicted response at the terminaldevice. When the predicted response is selected, the predicted responsemay be automatically transmitted to the network device during thecommunication session.

Certain embodiments of the present disclosure include a system. Thesystem may include one or more data processors; and a non-transitorycomputer-readable storage medium containing instructions which, whenexecuted on the one or more data processors, cause the one or more dataprocessors to perform the methods described above and herein.

Certain embodiments of the present disclosure include a computer-programproduct tangibly embodied in a non-transitory machine-readable storagemedium, including instructions configured to cause a data processingapparatus to perform the methods described above and herein.

Advantageously, the increasingly dynamic nature of data ingested intoand processed by systems (e.g., routing systems, the communicationserver described herein, and other suitable systems) introducescomplexity into network environments. Executing bot scripts toautonomously and automatically process tasks involving the complexingested data can cause undue burden on processing resources in thesystems (e.g., incorrect routing of messages may cause servers or queuesto be overloaded). Embodiments of the present disclosure providetechnical advantages, including the implementation of artificialintelligence or machine-learning techniques, to improve the overallfunctioning of systems by reducing load imbalance across servers orsystems, and continuously enhancing task management by bots.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure is described in conjunction with the appendedfigures:

FIG. 1 shows a block diagram of an embodiment of a network interactionsystem;

FIG. 2 shows a block diagram of another embodiment of a networkinteraction system;

FIGS. 3A-3C show block diagrams of other embodiments of a networkinteraction system that includes a connection management system;

FIG. 4 shows a representation of a protocol-stack mapping of connectioncomponents' operation;

FIG. 5 represents a multi-device communication exchange system accordingto an embodiment;

FIG. 6 shows a block diagram of an embodiment of a connection managementsystem;

FIG. 7 shows a block diagram of a network environment for dynamicallyswitching between bots and terminal devices during communicationsessions;

FIG. 8 shows a block diagram representing a network environment fordynamically providing bot task processing across multiple channelenvironments;

FIG. 9 shows a block diagram representing a network environment forenhancing bot task processing using machine-learning techniques;

FIG. 10 shows a block diagram representing a network environment forpredicting responses in real-time during communication sessions;

FIG. 11 shows an example process for predicting responses in real-timeduring communication sessions;

FIG. 12 shows an example process for switching between a bot and aterminal device during a communication session; and

FIG. 13 shows an example process flow performed, at least in part, bythe communication server for executing end-to-end management of bots.

In the appended figures, similar components and/or features can have thesame reference label. Further, various components of the same type canbe distinguished by following the reference label by a dash and a secondlabel that distinguishes among the similar components. If only the firstreference label is used in the specification, the description isapplicable to any one of the similar components having the same firstreference label irrespective of the second reference label.

DETAILED DESCRIPTION

The ensuing description provides preferred examples of embodiment(s)only and is not intended to limit the scope, applicability orconfiguration of the disclosure. Rather, the ensuing description of thepreferred examples of embodiment(s) will provide those skilled in theart with an enabling description for implementing a preferred examplesof embodiment. It is understood that various changes can be made in thefunction and arrangement of elements without departing from the spiritand scope as set forth in the appended claims.

FIG. 1 shows a block diagram of an embodiment of a network interactionsystem 100 which implements and supports certain embodiments andfeatures described herein. Certain embodiments relate to establishing aconnection channel between a network device 105 (which can be operatedby a user 110) and a terminal device 115 (which can be operated by anagent 120). In certain embodiments, the network interaction system 100can include a client device 130 associated with a client 125.

In certain embodiments, a user 110 can be an individual browsing a website or accessing an online service provided by a remote server 140. Aclient 125 can be an entity that provides, operates, or runs the website or the online service, or individuals employed by or assigned bysuch an entity to perform the tasks available to a client 125 asdescribed herein. The agent 120 can be an individual, such as a supportagent tasked with providing support or information to the user 110regarding the website or online service. Out of a large number ofagents, a subset of agents may be appropriate for providing support orinformation for a particular client 125. The agent 120 may be affiliatedor not affiliated with the client 125. Each agent can be associated withone or more clients 125. In some non-limiting examples, a user 110 canbe an individual shopping an online store from a personal computingdevice, a client 125 can be a company that sells products online, and anagent 120 can be a representative employed by the company. In variousembodiments, the user 110, client 125, and agent 120 can be otherindividuals or entities.

While FIG. 1 shows only a single network device 105, terminal device 115and client device 130, an interaction system 100 can include multiple ormany (e.g., tens, hundreds or thousands) of each of one or more of thesetypes of devices. Similarly, while FIG. 1 shows only a single user 110,agent 120 and client 125, an interaction system 100 can include multipleor many of each of one or more of such entities. Thus, it may benecessary to determine which terminal device is to be selected tocommunicate with a given network device. Further complicating matters, aremote server 140 may also be configured to receive and respond toselect network-device communications.

A connection management system 150 can facilitate strategic routing ofcommunications. A communication can include a message with content(e.g., defined based on input from an entity, such as typed or spokeninput). The communication can also include additional data, such as dataabout a transmitting device (e.g., an IP address, account identifier,device type and/or operating system); a destination address; anidentifier of a client; an identifier of a webpage or webpage element(e.g., a webpage or webpage element being visited when the communicationwas generated or otherwise associated with the communication) or onlinehistory data; a time (e.g., time of day and/or date); and/or destinationaddress. Other information can be included in the communication. In someinstances, connection management system 150 routes the entirecommunication to another device. In some instances, connectionmanagement system 150 modifies the communication or generates a newcommunication (e.g., based on the initial communication). The new ormodified communication can include the message (or processed versionthereof), at least some (or all) of the additional data (e.g., about thetransmitting device, webpage or online history and/or time) and/or otherdata identified by connection management system 150 (e.g., account dataassociated with a particular account identifier or device). The new ormodified communication can include other information as well.

Part of strategic-routing facilitation can include establishing,updating and using one or more connection channels between networkdevice 105 and one or more terminal devices 115. For example, uponreceiving a communication from network device 105, connection managementsystem 150 can first estimate to which client (if any) the communicationcorresponds. Upon identifying a client, connection management system 150can identify a terminal device 115 associated with the client forcommunication with network device 105. In some instances, theidentification can include evaluating a profile of each of a pluralityof agents (or experts or delegates), each agent (e.g., agent 120) in theplurality of agents being associated with a terminal device (e.g.,terminal device 115). The evaluation can relate to a content in anetwork-device message. The identification of the terminal device 115can include a technique described, for example, in U.S. application Ser.No. 12/725,799, filed on Mar. 17, 2010, which is hereby incorporated byreference in its entirety for all purposes.

In some instances, connection management system 150 can determinewhether any connection channels are established between network device105 and a terminal device associated with the client (or remote server140) and, if so, whether such channel is to be used to exchange a seriesof communications including the communication.

Upon selecting a terminal device 115 to communicate with network device105, connection management system 150 can establish a connection channelbetween the network device 105 and terminal device 115. In someinstances, connection management system 150 can transmit a message tothe selected terminal device 115. The message may request an acceptanceof a proposed assignment to communicate with a network device 105 oridentify that such an assignment has been generated. The message caninclude information about network device 105 (e.g., IP address, devicetype, and/or operating system), information about an associated user 110(e.g., language spoken, duration of having interacted with client, skilllevel, sentiment, and/or topic preferences), a received communication,code (e.g., a clickable hyperlink) for generating and transmitting acommunication to the network device 105, and/or an instruction togenerate and transmit a communication to network device 105.

In one instance, communications between network device 105 and terminaldevice 115 can be routed through connection management system 150. Sucha configuration can allow connection management system 150 to monitorthe communication exchange and to detect issues (e.g., as defined basedon rules) such as non-responsiveness of either device or extendedlatency. Further, such a configuration can facilitate selective orcomplete storage of communications, which may later be used, forexample, to assess a quality of a communication exchange and/or tosupport learning to update or generate routing rules so as to promoteparticular post-communication targets.

In some embodiments, connection management system 150 can monitor thecommunication exchange in real-time and perform automated actions (e.g.,rule-based actions) based on the live communications. For example, whenconnection management system 150 determines that a communication relatesto a particular item (e.g., product), connection management system 150can automatically transmit an additional message to terminal device 115containing additional information about the item (e.g., quantity of itemavailable, links to support documents related to the item, or otherinformation about the item or similar items).

In one instance, a designated terminal device 115 can communicate withnetwork device 105 without relaying communications through connectionmanagement system 150. One or both devices 105, 115 may (or may not)report particular communication metrics or content to connectionmanagement system 150 to facilitate communication monitoring and/or datastorage.

As mentioned, connection management system 150 may route selectcommunications to a remote server 140. Remote server 140 can beconfigured to provide information in a predetermined manner. Forexample, remote server 140 may access defined one or more text passages,voice recording and/or files to transmit in response to a communication.Remote server 140 may select a particular text passage, recording orfile based on, for example, an analysis of a received communication(e.g., a semantic or mapping analysis).

Routing and/or other determinations or processing performed atconnection management system 150 can be performed based on rules and/ordata at least partly defined by or provided by one or more clientdevices 130. For example, client device 130 may transmit a communicationthat identifies a prioritization of agents, terminal-device types,and/or topic/skill matching. As another example, client device 130 mayidentify one or more weights to apply to various variables potentiallyimpacting routing determinations (e.g., language compatibility,predicted response time, device type and capabilities, and/orterminal-device load balancing). It will be appreciated that whichterminal devices and/or agents are to be associated with a client may bedynamic. Communications from client device 130 and/or terminal devices115 may provide information indicating that a given terminal deviceand/or agent is to be added or removed as one associated with a client.For example, client device 130 can transmit a communication with IPaddress and an indication as to whether a terminal device with theaddress is to be added or removed from a list identifyingclient-associated terminal devices.

Each communication (e.g., between devices, between a device andconnection management system 150, between remote server 140 andconnection management system 150 or between remote server 140 and adevice) can occur over one or more networks 170. Any combination of openor closed networks can be included in the one or more networks 170.Examples of suitable networks include the Internet, a personal areanetwork, a local area network (LAN), a wide area network (WAN), or awireless local area network (WLAN). Other networks may be suitable aswell. The one or more networks 170 can be incorporated entirely withinor can include an intranet, an extranet, or a combination thereof. Insome instances, a network in the one or more networks 170 includes ashort-range communication channel, such as a Bluetooth or a BluetoothLow Energy channel. In one embodiment, communications between two ormore systems and/or devices can be achieved by a secure communicationsprotocol, such as secure sockets layer (SSL) or transport layer security(TLS). In addition, data and/or transactional details may be encryptedbased on any convenient, known, or to be developed manner, such as, butnot limited to, Data Encryption Standard (DES), Triple DES,Rivest-Shamir-Adleman encryption (RSA), Blowfish encryption, AdvancedEncryption Standard (AES), CAST-128, CAST-256, Decorrelated Fast Cipher(DFC), Tiny Encryption Algorithm (TEA), eXtended TEA (XTEA), CorrectedBlock TEA (XXTEA), and/or RCS, etc.

A network device 105, terminal device 115 and/or client device 130 caninclude, for example, a portable electronic device (e.g., a smart phone,tablet, laptop computer, or smart wearable device) or a non-portableelectronic device (e.g., one or more desktop computers, smartappliances, servers, and/or processors). Connection management system150 can be separately housed from network, terminal and client devicesor may be part of one or more such devices (e.g., via installation of anapplication on a device). Remote server 140 may be separately housedfrom each device and connection management system 150 and/or may be partof another device or system. While each device, server and system inFIG. 1 is shown as a single device, it will be appreciated that multipledevices may instead be used. For example, a set of network devices canbe used to transmit various communications from a single user, or remoteserver 140 may include a server stack.

A software agent or application may be installed on and/or executable ona depicted device, system or server. In one instance, the software agentor application is configured such that various depicted elements can actin complementary manners. For example, a software agent on a device canbe configured to collect and transmit data about device usage to aseparate connection management system, and a software application on theseparate connection management system can be configured to receive andprocess the data.

FIG. 2 shows a block diagram of another embodiment of a networkinteraction system 200. Generally, FIG. 2 illustrates a variety ofcomponents configured and arranged to enable a network device 205 tocommunicate with one or more terminal devices 215. The depicted instanceincludes nine terminal devices 215 included in three local-area networks235.

In some instances, a communication from network device 205 includesdestination data (e.g., a destination IP address) that at least partlyor entirely indicates which terminal device is to receive thecommunication. Network interaction system 200 can include one or moreinter-network connection components 240 and/or one or more intra-networkconnection components 255 that can process the destination data andfacilitate appropriate routing.

Each inter-network connection components 245 can be connected to aplurality of networks 235 and can have multiple network cards installed(e.g., each card connected to a different network). For example, aninter-network connection component 245 can be connected to a wide-areanetwork 270 (e.g., the Internet) and one or more local-area networks235. In the depicted instance, in order for a communication to betransmitted from network device 205 to any of the terminal devices, inthe depicted system, the communication must be handled by multipleinter-network connection components 245.

When an inter-network connection component 245 receives a communication(or a set of packets corresponding to the communication), inter-networkconnection component 245 can determine at least part of a route to passthe communication to a network associated with a destination. The routecan be determined using, for example, a routing table (e.g., stored atthe router), which can include one or more routes that are pre-defined,generated based on an incoming message (e.g., from another router orfrom another device) or learned.

Examples of inter-network connection components 245 include a router 260and a gateway 265. An inter-network connection component 245 (e.g.,gateway 265) may be configured to convert between network systems orprotocols. For example, gateway 265 may facilitate communication betweenTransmission Control Protocol/Internet Protocol (TCP/IP) andInternetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX)devices.

Upon receiving a communication at a local-area network 235, furtherrouting may still need to be performed. Such intra-network routing canbe performed via an intra-network connection component 255, such as aswitch 280 or hub 285. Each intra-network connection component 255 canbe connected to (e.g., wirelessly or wired, such as via an Ethernetcable) multiple terminal devices 215. Hub 285 can be configured torepeat all received communications to each device to which it isconnected. Each terminal device can then evaluate each communication todetermine whether the terminal device is the destination device orwhether the communication is to be ignored. Switch 280 can be configuredto selectively direct communications to only the destination terminaldevice.

In some instances, a local-area network 235 can be divided into multiplesegments, each of which can be associated with independent firewalls,security rules and network protocols. An intra-network connectioncomponent 255 can be provided in each of one, more or all segments tofacilitate intra-segment routing. A bridge 280 can be configured toroute communications across segments 275.

To appropriately route communications across or within networks, variouscomponents analyze destination data in the communications. For example,such data can indicate which network a communication is to be routed to,which device within a network a communication is to be routed to orwhich communications a terminal device is to process (versus ignore).However, in some instances, it is not immediately apparent whichterminal device (or even which network) is to participate in acommunication from a network device.

To illustrate, a set of terminal devices may be configured so as toprovide similar types of responsive communications. Thus, it may beexpected that a query in a communication from a network device may beresponded to in similar manners regardless to which network device thecommunication is routed. While this assumption may be true at a highlevel, various details pertaining to terminal devices can give rise toparticular routings being advantageous as compared to others. Forexample, terminal devices in the set may differ from each other withrespect to (for example) which communication channels are supported,geographic and/or network proximity to a network device and/orcharacteristics of associated agents (e.g., knowledge bases, experience,languages spoken, availability, general personality or sentiment, etc.).Accordingly, select routings may facilitate faster responses that moreaccurately and/or completely respond to a network-device communication.A complication is that static routings mapping network devices toterminal devices may fail to account for variations in communicationtopics, channel types, agent availability, and so on.

FIGS. 3A-3C show block diagrams of other embodiments of a networkinteraction system 300 a-c that includes a connection management system.Each of the depicted systems 300 a-c show only 2 local-area networks 235for simplicity, though it can be appreciated that embodiments can beextended to expand the number of local-area networks. Each of systems300 a-c include a connection management system 350, which can identifywhich terminal device is to communicate with network device 205, canestablish and manage (e.g., maintain or close) connection channels, candetermine whether and when to re-route communications in an exchange,and so on. Thus, connection management system 350 can be configured todynamically, and in real-time, evaluate communications, agentavailability, capabilities of terminal devices or agents, and so on, toinfluence routing determinations.

In FIG. 3A, connection management system 350 is associated with each ofnetwork device 205 and a remote server 340 (e.g., connection managementsystem 350 a is associated with network device 205 and connectionmanagement system 350 b is associated with remote server 340). Forexample, connection management system 350 a and/or connection managementsystem 350 b can be installed or stored as an application on each ofnetwork device 205 and remote server 340, respectively. Execution of theapplication(s) can facilitate, for example, a communication betweennetwork device 205 and remote server 340 to identify a terminal device215 selected to participate in a communication exchange with networkdevice 205. The identification can be made based on one or more factorsdisclosed herein (e.g., availability, matching between a communication'stopic/level of detail with agents' or terminal devices' knowledge bases,predicted latency, channel-type availability, and so on).

A client device 330 can provide client data indicating how routingdeterminations are to be made. For example, such data can include:indications as to how particular characteristics are to be weighted ormatched or constraints or biases (e.g., pertaining to load balancing orpredicted response latency). Client data can also include specificationsrelated to when communication channels are to be established (or closed)or when communications are to be re-routed to a different networkdevice. Client data can be used to define various client-specific rules,such as rules for communication routing and so on.

Connection management system 350 b executing on remote server 340 canmonitor various metrics pertaining to terminal devices (e.g., pertainingto a given client), such as which communication channels are supported,geographic and/or network proximity to a network device, communicationlatency and/or stability with the terminal device, a type of theterminal device, a capability of the terminal device, whether theterminal device (or agent) has communicated with a given network device(or user) before and/or characteristics of associated agents (e.g.,knowledge bases, experience, languages spoken, availability, generalpersonality or sentiment, etc.). Accordingly, connection managementsystem 350 b may be enabled to select routings to facilitate fasterresponses that more accurately and/or completely respond to anetwork-device communication based on the metrics.

In the example depicted in FIG. 3A, a communication exchange betweennetwork device 205 and remote server 340 can facilitate earlyidentification of a destination address. Network device 205 may then usethe destination address to direct subsequent communications. Forexample, network device 205 may send an initial communication to remoteserver 340 (e.g., via one or more inter-network connections and awide-area network), and remote server 340 may identify one or morecorresponding clients. Remote server 340 may then identify a set ofterminal devices associated with the one or more corresponding clientsand collect metrics for those terminal devices. The metrics can beevaluated (e.g., by remote server 340) so as to select a terminal deviceto involve in a communication exchange, and information pertaining tothe terminal device (e.g., an IP address) can be sent to network device205. In some embodiments, remote server 340 may continuously orperiodically collect and evaluate metrics for various terminal devicesand store evaluation results in a data store. In such embodiments, uponidentifying a set of terminal devices associated with the one or morecorresponding clients, remote server 340 can access the storedevaluation results from the data store and select a terminal device toinvolve in the communication exchange based on the stored evaluationresults.

In FIG. 3B, connection management system 350 can be configured to serveas a relay and/or destination address. Thus, for example, a set ofnetwork devices 205 may transmit communications, each identifyingconnection management system 350 as a destination. Connection managementsystem 350 can receive each communication and can concurrently monitor aset of terminal devices (e.g., so as to generate metrics for eachterminal device). Based on the monitoring and a rule, connectionmanagement system 350 can identify a terminal device 215 to which it mayrelay each communication. Depending on the embodiment, terminal devicecommunications may similarly be directed to a consistent destination(e.g., of connection management system 350) for further relaying, orterminal devices may begin communicating directly with correspondingnetwork devices. These embodiments can facilitate efficient routing andthorough communication monitoring.

The embodiment depicted in FIG. 3C is similar to that in FIG. 3B.However, in some embodiments, connection management system 350 isdirectly connected to intra-network components (e.g., terminal devices,intra-network connections, or other).

It will be appreciated that many variations of FIGS. 3A-3C arecontemplated. For example, connection management system 350 may beassociated with a connection component (e.g., inter-network connectioncomponent 245 or intra-network connection component 255) such that anapplication corresponding to connection management system 350 (or partthereof) is installed on the component. The application may, forexample, perform independently or by communicating with one or moresimilar or complementary applications (e.g., executing on one or moreother components, network devices or remotes servers).

FIG. 4 shows a representation of a protocol-stack mapping 400 ofconnection components' operation. More specifically, FIG. 4 identifies alayer of operation in an Open Systems Interaction (OSI) model thatcorresponds to various connection components.

The OSI model can include multiple logical layers 402-414. The layersare arranged in an ordered stack, such that layers 402-412 each serve ahigher level and layers 404-414 is each served by a lower layer. The OSImodel includes a physical layer 402. Physical layer 402 can defineparameters physical communication (e.g., electrical, optical, orelectromagnetic). Physical layer 402 also defines connection managementprotocols, such as protocols to establish and close connections.Physical layer 402 can further define a flow-control protocol and atransmission mode.

A link layer 404 can manage node-to-node communications. Link layer 404can detect and correct errors (e.g., transmission errors in the physicallayer 402) and manage access permissions. Link layer 404 can include amedia access control (MAC) layer and logical link control (LLC) layer.

A network layer 406 can coordinate transferring data (e.g., of variablelength) across nodes in a same network (e.g., as datagrams). Networklayer 406 can convert a logical network address to a physical machineaddress.

A transport layer 408 can manage transmission and receipt quality.Transport layer 408 can provide a protocol for transferring data, suchas a Transmission Control Protocol (TCP). Transport layer 408 canperform segmentation/desegmentation of data packets for transmission andcan detect and account for transmission errors occurring in layers402-406. A session layer 410 can initiate, maintain and terminateconnections between local and remote applications. Sessions may be usedas part of remote-procedure interactions. A presentation layer 412 canencrypt, decrypt and format data based on data types known to beaccepted by an application or network layer.

An application layer 414 can interact with software applications thatcontrol or manage communications. Via such applications, applicationlayer 414 can (for example) identify destinations, local resource statesor availability and/or communication content or formatting. Variouslayers 402-414 can perform other functions as available and applicable.

Intra-network connection components 422, 424 are shown to operate inphysical layer 402 and link layer 404. More specifically, a hub canoperate in the physical layer, such that operations can be controlledwith respect to receipts and transmissions of communications. Becausehubs lack the ability to address communications or filter data, theypossess little to no capability to operate in higher levels. Switches,meanwhile, can operate in link layer 404, as they are capable offiltering communication frames based on addresses (e.g., MAC addresses).

Meanwhile, inter-network connection components 426, 428 are shown tooperate on higher levels (e.g., layers 406-414). For example, routerscan filter communication data packets based on addresses (e.g., IPaddresses). Routers can forward packets to particular ports based on theaddress, so as to direct the packets to an appropriate network. Gatewayscan operate at the network layer and above, perform similar filteringand directing and further translation of data (e.g., across protocols orarchitectures).

A connection management system 450 can interact with and/or operate on,in various embodiments, one, more, all or any of the various layers. Forexample, connection management system 450 can interact with a hub so asto dynamically adjust which terminal devices the hub communicates. Asanother example, connection management system 450 can communicate with abridge, switch, router or gateway so as to influence which terminaldevice the component selects as a destination (e.g., MAC, logical orphysical) address. By way of further examples, a connection managementsystem 450 can monitor, control, or direct segmentation of data packetson transport layer 408, session duration on session layer 410, and/orencryption and/or compression on presentation layer 412. In someembodiments, connection management system 450 can interact with variouslayers by exchanging communications with (e.g., sending commands to)equipment operating on a particular layer (e.g., a switch operating onlink layer 404), by routing or modifying existing communications (e.g.,between a network device and a terminal device) in a particular manner,and/or by generating new communications containing particularinformation (e.g., new destination addresses) based on the existingcommunication. Thus, connection management system 450 can influencecommunication routing and channel establishment (or maintenance ortermination) via interaction with a variety of devices and/or viainfluencing operating at a variety of protocol-stack layers.

FIG. 5 represents a multi-device communication exchange system 500according to an embodiment. System 500 includes a network device 505configured to communicate with a variety of types of terminal devicesover a variety of types of communication channels.

In the depicted instance, network device 505 can transmit acommunication over a cellular network (e.g., via a base station 510).The communication can be routed to an operative network 515. Operativenetwork 515 can include a connection management system 520 that receivesthe communication and identifies which terminal device is to respond tothe communication. Such determination can depend on identifying a clientto which that communication pertains (e.g., based on a content analysisor user input indicative of the client) and determining one or moremetrics for each of one or more terminal devices associated with theclient. For example, in FIG. 5, each cluster of terminal devices 530 a-ccan correspond to a different client. The terminal devices may begeographically co-located or disperse. The metrics may be determinedbased on stored or learned data and/or real-time monitoring (e.g., basedon availability).

Connection management system 520 can communicate with various terminaldevices via one or more routers 525 or other inter-network orintra-network connection components. Connection management system 520may collect, analyze and/or store data from or pertaining tocommunications, terminal-device operations, client rules, and/oruser-associated actions (e.g., online activity) at one or more datastores. Such data may influence communication routing.

Notably, various other devices can further be used to influencecommunication routing and/or processing. For example, in the depictedinstance, connection management system 520 also is connected to a webserver 540. Thus, connection management system 520 can retrieve data ofinterest, such as technical item details, and so on.

Network device 505 may also be connected to a web server (e.g.,including a web server 545). In some instances, communication with sucha server provided an initial option to initiate a communication exchangewith connection management system 520. For example, network device 505may detect that, while visiting a particular webpage, a communicationopportunity is available and such an option can be presented.

One or more elements of communication system 500 can also be connectedto a social-networking server 550. Social networking server 550 canaggregate data received from a variety of user devices. Thus, forexample, connection management system 520 may be able to estimate ageneral (or user-specific) behavior of a given user or class of users.

FIG. 6 shows a block diagram of an embodiment of a connection managementsystem 600. A message receiver interface 605 can receive a message. Insome instances, the message can be received, for example, as part of acommunication transmitted by a source device (e.g., housed separatelyfrom connection management system 600 or within a same housing), such asa network device or terminal device. In some instances, thecommunication can be part of a series of communications or a communicateexchange, which can include a series of messages or message exchangebeing routed between two devices (e.g., a network device and terminaldevice). This message or communication exchange may be part of and/ormay define an interaction between the devices. A communication channelor operative channel can include one or more protocols (e.g., routingprotocols, task-assigning protocols and/or addressing protocols) used tofacilitate routing and a communication exchange between the devices.

In some instances, the message can include a message generated based oninputs received at a local or remote user interface. For example, themessage can include a message that was generated based on button or keypresses or recorded speech signals. In one instance, the messageincludes an automatically generated message, such as one generated upondetecting that a network device is presenting a particular app page orwebpage or has provided a particular input command (e.g., key sequence).The message can include an instruction or request, such as one toinitiate a communication exchange.

In some instances, the message can include or be associated with anidentifier of a client. For example, the message can explicitly identifythe client (or a device associated with the client); the message caninclude or be associated with a webpage or app page associated with theclient; the message can include or be associated with a destinationaddress associated with a client; or the message can include or beassociated with an identification of an item (e.g., product) or serviceassociated with the client. To illustrate, a network device may bepresenting an app page of a particular client, which may offer an optionto transmit a communication to an agent. Upon receiving user inputcorresponding to a message, a communication may be generated to includethe message and an identifier of the particular client.

A processing engine 610 may process a received communication and/ormessage. Processing can include, for example, extracting one or moreparticular data elements (e.g., a message, a client identifier, anetwork-device identifier, an account identifier, and so on). Processingcan include transforming a formatting or communication type (e.g., to becompatible with a particular device type, operating system,communication-channel type, protocol and/or network).

A message assessment engine 615 may assess the (e.g., extracted orreceived) message. The assessment can include identifying, for example,one or more categories or tags for the message. Examples of category ortag types can include (for example) topic, sentiment, complexity, andurgency. A difference between categorizing and tagging a message can bethat categories can be limited (e.g., according to a predefined set ofcategory options), while tags can be open. A topic can include, forexample, a technical issue, a use question, or a request. A category ortag can be determined, for example, based on a semantic analysis of amessage (e.g., by identifying keywords, sentence structures, repeatedwords, punctuation characters and/or non-article words); user input(e.g., having selected one or more categories); and/ormessage-associated statistics (e.g., typing speed and/or responselatency).

In some instances, message assessment engine 615 can determine a metricfor a message. A metric can include, for example, a number ofcharacters, words, capital letters, all-capital words or instances ofparticular characters or punctuation marks (e.g., exclamation points,question marks and/or periods). A metric can include a ratio, such as afraction of sentences that end with an exclamation point (or questionmark), a fraction of words that are all capitalized, and so on.

Message assessment engine 615 can store a message, message metric and/ormessage statistic in a message data store 620. Each message can also bestored in association with other data (e.g., metadata), such as dataidentifying a corresponding source device, destination device, networkdevice, terminal device, client, one or more categories, one or morestages and/or message-associated statistics). Various components ofconnection management system 600 (e.g., message assessment engine 615and/or an interaction management engine 625) can query message datastore 620 to retrieve query-responsive messages, message metrics and/ormessage statistics.

An interaction management engine 625 can determine to which device acommunication is to be routed and how the receiving and transmittingdevices are to communicate. Each of these determinations can depend, forexample, on whether a particular network device (or any network deviceassociated with a particular user) has previously communicated with aterminal device in a set of terminal devices (e.g., any terminal deviceassociated with connection management system 600 or any terminal deviceassociated with one or more particular clients).

In some instances, when a network device (or other network deviceassociated with a same user or profile) has previously communicated witha given terminal device, communication routing can be generally biasedtowards the same terminal device. Other factors that may influencerouting can include, for example, whether the terminal device (orcorresponding agent) is available and/or a predicted response latency ofthe terminal device. Such factors may be considered absolutely orrelative to similar metrics corresponding to other terminal devices. Are-routing rule (e.g., a client-specific or general rule) can indicatehow such factors are to be assessed and weighted to determine whether toforego agent consistency.

When a network device (or other network device associated with a sameuser or account) has not previously communicated with a given terminaldevice, a terminal-device selection can be performed based on factorssuch as, for example, an extent to which various agents' knowledge basecorresponds to a communication topic, availability of various agents ata given time and/or over a channel type, types and/or capabilities ofterminal devices (e.g., associated with the client). In one instance, arule can identify how to determine a sub-parameter to one or morefactors such as these and a weight to assign to each parameter. Bycombining (e.g., summing) weighted sub-parameters, a parameter for eachagent can be determined. A terminal device selection can then be made bycomparing terminal devices' parameters.

With regard to determining how devices are to communicate, interactionmanagement engine 625 can (for example) determine whether a terminaldevice is to respond to a communication via (for example) SMS message,voice call, video communication, etc. A communication type can beselected based on, for example, a communication-type priority list(e.g., at least partly defined by a client or user); a type of acommunication previously received from the network device (e.g., so asto promote consistency), a complexity of a received message,capabilities of the network device, and/or an availability of one ormore terminal devices. Appreciably, some communication types will resultin real-time communication (e.g., where fast message response isexpected), while others can result in asynchronous communication (e.g.,where delays (e.g., of several minutes or hours) between messages areacceptable).

Further, interaction management engine 625 can determine whether acontinuous channel between two devices should be established, used orterminated. A continuous channel can be structured so as to facilitaterouting of future communications from a network device to a specifiedterminal device. This bias can persist even across message series. Insome instances, a representation of a continuous channel (e.g.,identifying an agent) can be included in a presentation to be presentedon a network device. In this manner, a user can understand thatcommunications are to be consistently routed so as to promoteefficiency.

In one instance, a parameter can be generated using one or more factorsdescribed herein and a rule (e.g., that includes a weight for each ofthe one or more factors) to determine a connection parametercorresponding to a given network device and terminal device. Theparameter may pertain to an overall match or one specific to a givencommunication or communication series. Thus, for example, the parametermay reflect a degree to which a given terminal device is predicted to besuited to respond to a network-device communication. In some instances,a parameter analysis can be used to identify each of a terminal deviceto route a given communication to and whether to establish, use orterminate a connection channel. When a parameter analysis is used toboth address a routing decision and a channel decision, a parameterrelevant to each decision may be determined in a same, similar ordifferent manner.

Thus, for example, it will be appreciated that different factors may beconsidered depending on whether the parameter is to predict a strengthof a long-term match versus one to respond to a particular messagequery. For example, in the former instance, considerations of overallschedules and time zones may be important, while in the latter instance,immediate availability may be more highly weighted. A parameter can bedetermined for a single network-device/terminal-device combination, ormultiple parameters can be determined, each characterizing a matchbetween a given network device and a different terminal device.

To illustrate, a set of three terminal devices associated with a clientmay be evaluated for potential communication routing. A parameter may begenerated for each that relates to a match for the particularcommunication. Each of the first two terminal devices may havepreviously communicated with a network device having transmitted thecommunication. An input from the network device may have indicatedpositive feedback associated with an interaction with thecommunication(s) with the first device. Thus, a past-interactsub-parameter (as calculated according to a rule) for the first, secondand third devices may be 10, 5, and 0, respectively. (Negative feedbackinputs may result in negative sub-parameters.) It may be determined thatonly the third terminal device is available. It may be predicted thatthe second terminal device will be available for responding within 15minutes, but that the first terminal device will not be available forresponding until the next day. Thus, a fast-response sub-parameter forthe first, second and third devices may be 1, 3 and 10. Finally, it maybe estimated a degree to which an agent (associated with the terminaldevice) is knowledgeable about a topic in the communication. It may bedetermined that an agent associated with the third terminal device ismore knowledgeable than those associated with the other two devices,resulting in sub-parameters of 3, 4 and 9. In this example, the ruledoes not include weighting or normalization parameters (though, in otherinstances, a rule may), resulting in parameters of 14, 11 and 19. Thus,the rule may indicate that the message is to be routed to a device withthe highest parameter, that being the third terminal device. If routingto a particular terminal device is unsuccessful, the message can berouted to a device with the next-highest parameter, and so on.

A parameter may be compared to one or more absolute or relativethresholds. For example, parameters for a set of terminal devices can becompared to each other to identify a high parameter to select a terminaldevice to which a communication can be routed. As another example, aparameter (e.g., a high parameter) can be compared to one or moreabsolute thresholds to determine whether to establish a continuouschannel with a terminal device. An overall threshold for establishing acontinuous channel may (but need not) be higher than a threshold forconsistently routing communications in a given series of messages. Thisdifference between the overall threshold and threshold for determiningwhether to consistently route communication may be because a strongmatch is important in the continuous-channel context given the extendedutility of the channel. In some embodiments, an overall threshold forusing a continuous channel may (but need not) be lower than a thresholdfor establishing a continuous channel and/or for consistently routingcommunications in a given series of messages.

Interaction management engine 625 can interact with an account engine630 in various contexts. For example, account engine 630 may look up anidentifier of a network device or terminal device in an account datastore 635 to identify an account corresponding to the device. Further,account engine 630 can maintain data about previous communicationexchanges (e.g., times, involved other device(s), channel type,resolution stage, topic(s) and/or associated client identifier),connection channels (e.g., indicating—for each of one or moreclients—whether any channels exist, a terminal device associated witheach channel, an establishment time, a usage frequency, a date of lastuse, any channel constraints and/or supported types of communication),user or agent preferences or constraints (e.g., related toterminal-device selection, response latency, terminal-deviceconsistency, agent expertise, and/or communication-type preference orconstraint), and/or user or agent characteristics (e.g., age,language(s) spoken or preferred, geographical location, interests, andso on).

Further, interaction management engine 625 can alert account engine 630of various connection-channel actions, such that account data store 635can be updated to reflect the current channel data. For example, uponestablishing a channel, interaction management engine 625 can notifyaccount engine 630 of the establishment and identify one or more of: anetwork device, a terminal device, an account and a client. Accountengine 635 can (in some instances) subsequently notify a user of thechannel's existence such that the user can be aware of the agentconsistency being availed.

Interaction management engine 625 can further interact with a clientmapping engine 640, which can map a communication to one or more clients(and/or associated brands). In some instances, a communication receivedfrom a network device itself includes an identifier corresponding to aclient (e.g., an identifier of a client, webpage, or app page). Theidentifier can be included as part of a message (e.g., which clientmapping engine 640 may detect) or included as other data in amessage-inclusive communication. Client mapping engine 640 may then lookup the identifier in a client data store 645 to retrieve additional dataabout the client and/or an identifier of the client.

In some instances, a message may not particularly correspond to anyclient. For example, a message may include a general query. Clientmapping engine 640 may, for example, perform a semantic analysis on themessage, identify one or more keywords and identify one or more clientsassociated with the keyword(s). In some instances, a single client isidentified. In some instances, multiple clients are identified. Anidentification of each client may then be presented via a network devicesuch that a user can select a client to communicate with (e.g., via anassociated terminal device).

Client data store 645 can include identifications of one or moreterminal devices (and/or agents) associated with the client. A terminalrouting engine 650 can retrieve or collect data pertaining to each ofone, more or all such terminal devices (and/or agents) so as toinfluence routing determinations. For example, terminal routing engine650 may maintain a terminal data store 655, which can store informationsuch as terminal devices' device types, operating system,communication-type capabilities, installed applications accessories,geographic location and/or identifiers (e.g., IP addresses). Someinformation can be dynamically updated. For example, informationindicating whether a terminal device is available may be dynamicallyupdated based on (for example) a communication from a terminal device(e.g., identifying whether the device is asleep, being turned off/on,non-active/active, or identifying whether input has been received withina time period); a communication routing (e.g., indicative of whether aterminal device is involved in or being assigned to be part of acommunication exchange); or a communication from a network device orterminal device indicating that a communication exchange has ended orbegun.

It will be appreciated that, in various contexts, being engaged in oneor more communication exchanges does not necessarily indicate that aterminal device is not available to engage in another communicationexchange. Various factors, such as communication types (e.g., message),client-identified or user-identified target response times, and/orsystem loads (e.g., generally or with respect to a user) may influencehow many exchanges a terminal device may be involved in.

When interaction management engine 625 has identified a terminal deviceto involve in a communication exchange or connection channel, it cannotify terminal routing engine 650, which may retrieve any pertinentdata about the terminal device from terminal data store 655, such as adestination (e.g., IP) address, device type, protocol, etc. Processingengine 610 can then (in some instances) modify the message-inclusivecommunication or generate a new communication (including the message) soas to have a particular format, comply with a particular protocol, andso on. In some instances, a new or modified message may includeadditional data, such as account data corresponding to a network device,a message chronicle, and/or client data.

A message transmitter interface 660 can then transmit the communicationto the terminal device. The transmission may include, for example, awired or wireless transmission to a device housed in a separate housing.The terminal device can include a terminal device in a same or differentnetwork (e.g., local-area network) as connection management system 600.Accordingly, transmitting the communication to the terminal device caninclude transmitting the communication to an inter- or intra-networkconnection component.

Systems and methods for dynamically switching between bots and terminaldevices (e.g., operated by live agents) during communication sessionswith network devices (e.g., operated by users) is provided. In someimplementations, bots can be configured to autonomously communicate withnetwork devices. Further, bots can be configured for a specificcapability. Examples of capabilities can include updating databaserecords, providing updates to users, providing additional data about theuser to agents, determining a user's intent and routing the user to adestination system based on the intent, predicting or suggestingresponses to agents communicating with users, escalating communicationsessions to include one or more additional bots or agents, and othersuitable capabilities. In some implementations, while a bot iscommunicating with a network device (e.g., operated by the user) duringa communication session (e.g., using a chat-enabled interface), acommunication server can automatically and dynamically determine toswitch the bot with a terminal device. For example, bots can communicatewith users about certain tasks (e.g., updating a database recordassociated with a user), whereas, terminal devices can communicate withusers about more difficult tasks (e.g., communicating using acommunication channel to solve a technical issue).

In some implementations, determining whether to switch between a bot anda terminal device during a communication session can be based on ananalysis of one or more characteristics of the messages in acommunication session. Further, a dynamic sentiment parameter can begenerated to represent a sentiment of messages, conversations, entities,agents, and so on. For example, in cases where the dynamic sentimentparameter indicates that the user is frustrated with the bot, the systemcan automatically switch the bot with a terminal device so that a liveagent can communicate with the user. See U.S. Ser. No. 15/171,525, filedJun. 2, 2016, the disclosure of which is incorporated by referenceherein in its entirety for all purposes. In some examples, determiningwhether to switch between the bots and terminal devices can be performedwithout a prompt from a user. The determination can be performedautomatically at the communication server based any number of factors,including characteristics of the current messages in the communicationsession (e.g., chat), characteristics of previous messages transmittedby the user in previous communication sessions, a trajectory of acharacteristic (e.g., a sentiment) over multiple messages in aconversation, or additional information associated with the user (e.g.,profile information, preference information, and other suitableinformation associated with the user).

FIG. 7 shows a block diagram of a network environment for dynamicallyswitching between bots and terminal devices during communicationsessions. In some implementations, network environment 700 can includenetwork device 705, communication server 710, terminal device 715, andbot 720. Communication server 710 can be a server with one or moreprocessors with at least one storage device, and can be configured toperform methods and techniques described herein. For example,communication server 710 can manage communication sessions betweennetwork devices (e.g., operated by users) and terminal devices (e.g.,operated by agents). Communication server 710 can establish acommunication channel between network device 705 and terminal device 715so that network device 705 and terminal device 715 can communicate witheach other during a communication session. A communication session canfacilitate the exchange of one or more messages between network device705 and terminal device 715. The present disclosure is not limited tothe exchange of messages during a communication session. Other forms ofcommunication can be facilitated by the communication session, forexample, video communication (e.g., a video feed) and audiocommunication (e.g., a Voice-Over-IP connection).

In some implementations, communication server 710 can establish acommunication channel between network device 705 and bot 720. Bot 720can be code that, when executed, is configured to autonomouslycommunicate with network device 705. For example, bot 720 can be a botthat automatically generates messages to initiate conversations with theuser associated with network device 705 and/or to automatically respondto messages from network device 705. In addition, communication server710 can be associated with a platform. Clients (e.g., an external systemto the platform) can deploy bots in their internal communication systemsusing the platform. In some examples, clients can use their own bots inthe platform, which enables clients to implement the methods andtechniques described herein into their internal communication systems.

In some implementations, bots can be defined by one or more sources. Forexample, data store 730 can store code representing bots that aredefined (e.g., created or coded) by clients of the communication server.For example, a client that has defined its own bots can load the bots tothe communication server 710. The bots defined by clients can be storedin client bots data store 730. Data store 740 can store coderepresenting bots that are defined by third-party systems. For example,a third-party system can include an independent software vendor. Datastore 750 can store code representing bots that are defined by an entityassociated with communication server 710. For example, bots that arecoded by the entity can be loaded to or accessible by communicationserver 710, so that the bots can be executed and autonomouslycommunicate with users. In some implementations, communication server710 can access bots stored in data store 730, data store 740, and/ordata store 750 using cloud network 760. Cloud network 760 may be anynetwork, and can include an open network, such as the Internet, personalarea network, local area network (LAN), campus area network (CAN),metropolitan area network (MAN), wide area network (WAN), wireless localarea network (WLAN), a private network, such as an intranet, extranet,or other backbone.

In addition, terminal device 715 can be operated by an agent. Terminaldevice 715 can be any portable (e.g., mobile phone, tablet, laptop) ornon-portable device (e.g., electronic kiosk, desktop computer, etc.). Insome instances, the agent can access a website using a browser that isrunning on terminal device 715. For example, the website can include aconsole or platform that is running on the browser of terminal device715. The agent can be logged into the platform using the browser. One ormore login credentials (e.g., username, password, and the like) can beused to authenticate the agent's identity before allowing the agent togain access to the console or web applications included in the console.Examples of a console can include a platform that includes one or moreAPIs (application programming interfaces), a dashboard including one ormore functions, a web-hosted application running on a web browser(without the need for downloading plug-ins) that is capable ofestablishing or joining a communication session, and other suitableinterfaces. Further, the console can include one or more webapplications or functions that can be executed. The web applications orfunctions can be executed at the browser, at communication server 710, alocal server, a remote server, or other suitable computing device. Forexample, the web applications, native applications, or functions canenable an agent to communicate with a user, and to view communicationsbetween the user and one or more bots.

In some implementations, communication server 710 can be configured todynamically switch between bot 720 and terminal device 715 during aparticular communication session. For example, communication server 710can facilitate a communication session between network device 705 andbot 720. Bot 720 can be configured to autonomously communicate withnetwork device 705 by exchanging one or more messages with the networkdevice 705 during the communication session. Communication server 710can dynamically determine whether to switch bot 720 with terminal device715 (or in some cases, vice versa) so that a live agent can communicatewith network device 705, instead of bot 720. In some implementations,the switching can be performed without a prompt from the network device705 or terminal device 715. For example, the switching can be based onmessage parameters (e.g., scores representing sentiment of a message orseries of messages) of the messages exchanged between the network device705 and the bot 720, without prompting the network device 705 to requesta terminal device.

In some implementations, communication server 710 can determine toswitch between bot 720 and terminal device 715 automatically based oncharacteristics of the messages exchanged between the bot 720 and thenetwork device 705. In some instances, analyzing the text of a messageto determine the characteristic (e.g., the message parameter) caninclude an analysis of textual or non-textual attributes associated withthe message. For example, communication server 710 can extract one ormore lines of text included in the message from network device 705.Communication server 710 can identify whether the one or more lines oftext include an anchor. Examples of an anchor include a string of textassociated with a polarity (e.g., sentiment or intent, the word“frustrated” corresponding to a negative polarity or frustratedpolarity, the word “happy” corresponding to a positive polarity, and soon). For example, a term “dispute” for one client can be negative, butcan be neutral or positive for a second client. In some instances,anchors can be dynamically determined using supervised machine learningtechniques. For example, one or more clustering algorithms can beexecuted on stored messages to find patterns within the stored messages.The clustered messages can be further filtered and evaluated todetermine the anchor. Further, one or more words near the identifiedanchor can be parsed for amplifiers. An example of an amplifier is aterm that increases or decreases an intensity associated with thepolarity of the anchor, such as “really,” “not really,” “kind of,” andso on. The characteristic can include, for example, the speed of typing,the number of special characters used in the message (e.g., exclamationpoints, question marks, and so on), a semantic analysis of a message(e.g., by identifying keywords, sentence structures, repeated words,punctuation characters and/or non-article words); user input (e.g.,having selected one or more categories); and/or message-associatedstatistics (e.g., response latency).

As a non-limiting example, the message parameter can be a numericalvalue that indicates the high intensity of the negative polarity (e.g.,a message parameter of 20 on a scale of 0-100, with lower numbersindicating a negative polarity and higher numbers indicating a positivepolarity). An algorithm can be used to calculate the message parameter.For example, the algorithm may be based on supervised machine learningtechniques. In a further example, if the term “kind of” is near theanchor “don't like” (e.g., as in the sentence “I kind of don't like”),the term “kind of” may be identified as an amplifier term that indicatesa medium intensity of the negative polarity. In this case, a messageparameter can be generated based on the identification of the mediumintensity of the negative polarity. As a non-limiting example, themessage parameter can be a numerical value that indicates the mediumintensity of the negative polarity (e.g., a message parameter of 40, asopposed to the message parameter of 20). In some instances, the messageparameter can be used to determine which secondary queue is to store thecommunication.

In some implementations, the characteristic of a message can be thesentiment associated with the message. The message parameter canrepresent the sentiment of the message. For example, if the sentiment ofthe message is happy, the message parameter can be a certain value orrange of values, whereas, if the sentiment of the message is angry, themessage parameter can be another value or range of values. Determiningwhether to switch between the bots and the terminal device can be basedon the message parameter, which is continuously and automaticallyupdated with each new message received at communication server 710.

In some implementations, communication server 710 may recommend orpredict responses to messages received from network device 705. Forexample, communication server 710 can include a message recommendationsystem (described in FIG. 10), which can evaluate messages received fromnetwork device 705 and use a machine-learning model to recommendresponses to those received messages. The message recommendation systemcan display a set of recommended messages on terminal device 715 toassist the agent in communicating with network device 705.

FIG. 8 shows a block diagram representing network environment 800 fordynamically providing bot task processing across multiple communicationchannels. In some implementations, network environment 800 may includenetwork device 805, terminal device 810, and communication server 820.Network device 805 may be similar to network device 705, and thus, adescription is omitted here for the sake of brevity. Terminal device 810may be similar to terminal device 715, and thus, a description isomitted here for the sake of brevity. Communication server 820 may besimilar to Communication server 710, and thus, a description is omittedhere for the sake of brevity.

Communication server 820 may establish or facilitate the establishmentof a communication channel between network device 805 and terminaldevice 810. As illustrated in FIG. 8, communication server 820 mayestablish communication channel C 840, which enables network device 805and terminal device 810 to exchange one or more messages. As anon-limiting example, communication channel C 840 may be a web chatfeature of a website, communication channel B 835 may be a chatapplication running on a mobile device (e.g., a smart phone), andcommunication channel A 830 may be a voice over Internet Protocol (VOIP)audio channel that enables the agent to communicate with the user.

Communication server 820 may configure bot 825 to autonomouslycommunicate with network device 805. In some implementations, bot 825may access and execute one or more protocols that enable bot 825 tocommunicate with network device 805 using communication channel C 840.Continuing with the non-limiting example above, bot 825 may access andexecute a protocol for communicating over the web chat feature of thewebsite. In this example, the protocol may include a coding languagespecific to the web chat feature for exchanging messages using the webchat feature. The protocol may include code that, when executed,converts a message (e.g., a string of text or other content) inputted byan agent at terminal device 810 into structured content (e.g., contentseparated into independent data fields), and maps the structured contentto elements of the web chat feature of the website. As input is receivedat terminal device 810 (e.g., by the agent), bot 825 can translate thestructured content to the elements of the web chat feature to enable themessage to be communicated using the web chat feature.

In some implementations, bot 825 can also be configured to communicatewith network device 805 using communication channel B 835. Communicationchannel B 835 can be a different communication channel fromcommunication channel C 840. Further, communication channel B 835 mayrequire different elements to facilitate communication than the elementsrequired for communication channel C 840. Bot 825 can be configured totranslate the structured content to the elements of communicationchannel B 835. Continuing with the non-limiting example described above,communication channel B 835 may be an in-app chat feature of a nativeapplication running on a smart phone. One or more elements may berequired in order to facilitate communication using communicationchannel B 835. For example, FACEBOOK MESSENGER may be the nativeapplication running on the smart phone. In this example, the one or moreelements of FACEBOOK MESSENGER may be templates specific to FACEBOOKMESSENGER that are required to facilitate communication using FACEBOOKMESSENGER.

The protocol that enables bot 825 to communicate using communicationchannel B 835 may map the structured content to the templates of theFACEBOOK MESSENGER native application in order to transmit thestructured content as a message within the FACEBOOK MESSENGERapplication.

In some examples, a mobile application (e.g., a mobile nativeapplication) may include executable code (stored in the mobile device orat one or more external servers) that can be executed using theoperating system of the network device (e.g., a smartphone). In someexamples, the mobile application may include a hybrid mobile applicationthat is comprised of native user interface (UI) components (generatedand stored at the mobile device), but is written in an interpretedlanguage (e.g., using Web-based coding languages). The presentdisclosure is not limited to mobile native applications or hybridapplications, and thus, any type of mobile application may be used inthe methods described herein.

In some implementations, bot 825 can also be configured to communicatewith network device 805 using communication channel A 830. Communicationchannel A 835 can be a different communication channel fromcommunication channel C 840 and communication channel B 835. Further,communication channel A 830 may require different elements to facilitatecommunication than the elements required for communication channel C 840and for communication channel B 835. Bot 825 can be configured totranslate the structured content to the elements of communicationchannel A 830. Continuing with the non-limiting example described above,communication channel A 830 may be a VOIP audio communication linkbetween network device 805 and terminal device 810. One or more elementsmay be required in order to facilitate communication using communicationchannel A 830. The protocol may include a mapping of the structuredcontent to the elements associated with communication channel A 830.

In some implementations, communication server 820 may be configured todynamically, autonomous, and/or automatically transfer a communicationsession between different communication channels, so that bot 825 cancontinuously communicate with network device 805, regardless of thecommunication channel. For example, network device 805 may becommunicating with terminal device 810 using a first communicationchannel 845 (i.e., communication channel C 840). Network device 805 maytransmit a message indicating that the user operating network device 805intends to change the communication channel currently being used for thecommunication session. For example, network device 805 may indicate thatsecond communication channel 850 is the target communication channel forcontinuing the communication session with terminal device 810. Bot 825can automatically detect the indication that the communication channelshould be changed from first communication channel 845 to secondcommunication channel 850. For example, bot 825 may continuouslyevaluate messages exchanged during the communication session to detectthat the communication channel should be changed. Upon detecting theindication that the communication channel should be changed,communication server may identify the user identifier associated withnetwork device 805. For example, user data database 815 may store useridentifiers for various users. A user identifier may be a string of textand/or numbers that uniquely identifies a network device. If, at anygiven time, communication server 820 determines that the same useridentifier is associated with two active communication channels,communication server 820 can recognize that the network device isrequesting to continue a communication session but to change thecommunication channels.

Communication server 820 may be configured to support continuity betweendifferent communication channels. For example, the target communicationchannel (e.g., second communication channel 850) can be automaticallyused by bot 825 to continue the communication session with networkdevice 805, but using second communication channel 850, instead of firstcommunication channel 845. In some implementations, bot 825 mayautomatically transmit a message to network device 805 using secondcommunication channel 850. Transmitting the message to network device805 may indicate to network device 805 that the transfer ofcommunication channels is complete. In some implementations,communication server 820 may automatically detect that the communicationchannel has been changed from first communication channel 845 to secondcommunication channel 850. For example, communication server 820 mayrecognize the user identifier associated with network device 805 whennetwork device 805 is communicating with bot 825 using firstcommunication channel 845. If network device 805 begins using secondcommunication channel 850 (e.g., without indicating the intention tochange communication channels during the communication session),communication server 820 can automatically detect that the useridentifier for network device 805 is currently associated with twoactive communication channels (e.g., first communication channel 845 andsecond communication channel 850). Communication server 820 can detectthat first communication channel 845 is associated with a recent historyof messages (e.g., messages transmitted or exchanged within the lastfive minutes) and that second communication channel 850 is notassociated with a recent history of messages (e.g., within the last fewminutes). As a result, communication server 820 can determine thatnetwork device 805 is requesting to transfer the communication sessionfrom first communication channel 845 to second communication channel850. Communication server 820 can implement the transfer by accessingthe protocol associated with second communication channel 850, andexecuting bot 825 using the accessed protocol to enable bot 825 orterminal device 810 to communicate with network device 805 using secondcommunication channel 850, instead of using first communication channel845.

In some implementations, one or more machine-learning techniques can beused to identify patterns in the communication channel usage of networkdevice 805. For example, the usage of communication channels by networkdevice 805 can be tracked and recorded (and stored as historical data).Machine-learning techniques can be applied to the historical data toidentify which communication channel network device 805 is most likelyto use when communicating with a particular entity (e.g., company,terminal device, agent, and so on). When initiating communications fromterminal device 810 (or bot 825 or any other terminal device) to networkdevice 805, communication server 820 can establish a communicationchannel of the type that network device 805 is most likely to use (basedon the results of the machine learning techniques). As network device805 begins to use a different communication channel more frequently,communication server 820 can identify this changing trend and initiatecommunication sessions using the most used or most frequently usedcommunication channel.

FIG. 9 shows a block diagram representing network environment 900 forenhancing bot task processing using machine-learning techniques. Networkenvironment 900 may include network device 905 (operated by a user)communication server 910 and terminal devices 915 and 920. Communicationserver 910 can facilitate the establishment of a communication channelthat enables network device 905 and at least one of terminal devices 915and 920 to communication.

Communication server 910 may include intelligent routing system 925,message recommendation system 930, and message data store 935. Each ofintelligent routing system 925 and message recommendation system 930 mayinclude one or more computing devices with a processor and a memory thatexecute instructions to implement certain operations. In someimplementations, intelligent routing system 925 may be a bot configuredto intelligently route communications received from network devices tothe appropriate destination. Intelligent routing system 925 may includeone or more processors configured to execute code that causes one ormore machine-learning techniques or artificial intelligence techniquesto intelligently route messages. In some implementations, intelligentrouting system 925 can execute one or more machine-learning techniquesto train a model that predicts a destination associated with a messagereceived from network device 905.

As a non-limiting example, intelligent routing system 925 may receive amessage from network device 905 through a communication channelestablished or facilitated by communication server 910 (e.g., a nativeapplication configured to enable users to communicate with each otheracross various devices). Intelligent routing system 925 may evaluate theincoming message according to certain embodiments described above. Forexample, intelligent routing system 925 may evaluate the content (e.g.,text, audio clips, images, emoticons, or other suitable content)included in the received message using a trained machine-learning model.The content of the message can be inputted into the machine-learningmodel to generate a predicted destination (e.g., a particular terminaldevice). The machine-learning model may be continuously trained based onfeedback signal 940 received from network device 905. In someimplementations, intelligent routing system 925 may request anacknowledgement from network device 905 of the predicted destination. Asa non-limiting example, intelligent routing system 925 may evaluate themessage using a machine-learning technique, and a result of theevaluation may include a predication that terminal device 915 is thedestination for the message. To confirm, intelligent routing system 925may automatically request feedback signal 940. For example, feedbacksignal 940 may include a request for network device 905 to acknowledgewhether terminal device 915 is the correct destination for the message(e.g., “Is Technical Support the correct destination?”). If networkdevice 905 transmits the acknowledgement that terminal device 915 is thecorrect destination (e.g., the destination intended by the useroperating network device 905), then intelligent routing system 925 maytrain the machine-learning model to predict that future messagesincluding the exact or similar content (e.g., a threshold of similarity,such as 10 percent difference in content) as the received message are tobe routed to terminal device 915. However, if intelligent routing system925 receives feedback signal 940 indicating that terminal device 915 isnot the correct or intended destination for the received message, butrather terminal device 920 was the correct or intended destination,intelligent routing system 925 can train the machine-learning model thatfuture messages including the exact or similar content as the receivedmessage are to be routed to terminal device 920 (instead of terminaldevice 915). In some implementations, intelligent routing system 925 maynot immediately update or train the machine-learning model to routefuture messages to terminal device 920, but rather, intelligent routingsystem 925 may wait for a threshold number of incorrect routings toterminal device 915 before routing all future messages with the exactsame or similar content as the received message to terminal device 920.As a non-limiting example, intelligent routing system 925 may beginrouting future messages (that were predicted to be routed to terminaldevice 915) to terminal device 920 instead of terminal device 915 afterfive instances of network devices transmitting feedback signalsindicating that terminal device 915 is not the correct or intendeddestination.

Message data store 935 may store some (e.g., but not all) or allmessages received in the past from one or more network devices. Further,message data store 935 may also store some or all messages transmittedby terminal devices during previous communication sessions with networkdevices. Message data store 935 may also store some or all messagestransmitted by network devices to bots during communication sessions.Further, message data store 935 may store some or all messagestransmitted by bots to network devices during communication sessions. Insome implementations, message data store 935 may be a database of allmessages processed (e.g., transmitted by or received at) communicationserver 910.

Message recommendation system 930 may analyze the database of messagesstored at message data store 935. In some implementations, messagerecommendation system 930 may evaluate the messages stored at messagedata store 935 using one or more machine-learning algorithms orartificial intelligence algorithms. For example, message recommendationsystem 930 may execute one or more clustering algorithms, such asK-means clustering, means-shift clustering, Density-Based SpatialClustering of Applications with Noise (DBSCAN) clustering,Expectation-Maximization (EM) Clustering using Gaussian Mixture Models(GMM), and other suitable machine-learning algorithms, on the databaseof messages stored in message data store 935. In some implementations, arecurrent neural network (RNN) or a convolutional neural network (CNN)may be used to predict response messages to assist the agent. In someimplementations, message recommendation system 930 may use supportvector machines (SVM), supervised, semi-supervised, ensemble techniques,or unsupervised machine-learning techniques to evaluate all previousmessages to predict responses to incoming messages received from networkdevices during communication sessions. For example, messagerecommendation system 930 may evaluate the content of messages receivedfrom network devices (or messages received at communication server 910from bots or terminal devices) and compare the results of the evaluationto the one or more clusters of previous messages stored in message datastore 935. Once the cluster is identified, message recommendation system930 can identify the most relevant response messages based on aconfidence threshold. For example, an incoming message (e.g., receivedat communication server 910 from network device 905) may correspond to atechnical issue based on the content of the incoming message. Messagerecommendation system 930 can identify that the incoming messagecorresponds to a technical issue based on an evaluation of the contentof the incoming message (e.g., text evaluation). Message recommendationsystem 930 can access message data store 935 to identify the cluster ofmessages associated with technical issues. Message recommendation system930 can select one or more responses messages within the cluster ofmessages based on a confidence threshold. As a non-limiting example, aconfidence algorithm can be executed to generate a confidence score. Aconfidence score may be a percentage value where the lower thepercentage, the less likely the response is a good prediction for theincoming message, and the higher the percentage, the more likely theresponse is a good prediction for the incoming message. A minimumconfidence threshold may be defined as a measure of certainty ortrustworthiness associated with each discovered pattern. Further, anexample of a confidence algorithm may be the Apriori Algorithm,similarity algorithms indicating similarity between two data sets, andother suitable confidence algorithms.

FIG. 10 shows a block diagram representing network environment 1000 forpredicting responses in real-time during communication sessions. In someimplementations, network environment 1000 can include communicationserver 1010, the prediction system 1050, the message database 1040, andthe machine-learning model 1060. Network device 1030 can be operated bya user (e.g., a website visitor, a mobile website visitor, or a nativeapplication user) who can communicate with terminal device 1020 operatedby an agent. The prediction system 1050 can predict messages to bepresented on the display of terminal device 1020, and the agentoperating the terminal device can select a displayed predicted message.Upon selecting the displayed predicted message, that predicted messageis automatically included in the chat session as the next message andtransmitted to network device 1030.

For the purpose of illustration and as a non-limiting example,communication server 1010 may facilitate establishing a communicationchannel between network device 1030 and terminal device 1020. Thecommunication channel may be configured to enable network device 1030 tocommunicate with terminal device 1020 (e.g., by exchanging messages,audio, video, or other suitable data) during a communication session(e.g., a period of time in which the user and the agent are engaged inconversation or are not engaged in conversation, a synchronouscommunication session, an asynchronous communication session). Networkdevice 1030 may transmit a message during the communication session. Themessage may include the following text: “Could you please help me with atechnical issue I'm experiencing with the new ABC smart phone?” As themessage or text strings of the message are received at communicationserver 1010 in real-time, prediction system 1050 may automaticallyevaluate the message or the portion of the message (e.g., portion oftext of the message) received in real-time. Substantially at the sametime (e.g., concurrently or within seconds of receiving the message orportion of the message), the prediction system 1050 may accessmachine-learning model 1060 to predict a response to the receivedmessage. For example, prediction system 1050 may access machine-learningmodel 1060 to identify a cluster of previous messages that are similarto the received message. For example, prediction system 1050 mayassociate clusters of previous messages with a tag. As a non-limitingexample, one of the clusters of messages may be tagged as a “technicalissues with ABC smart phone” cluster of messages. Some or all of themessages in the “technical issues” cluster may be associated withprevious conversations between network devices and terminal devices orbots about technical issues with items, such as the ABC smart phone. Forexample, prediction system 1050 may perform a confidence analysis on the“technical issues” cluster to identify the top 10 previous responses tothe same or similar question included in the received message. Aconfidence analysis may include executing a confidence algorithm thatdetermines the similarity between the received message and the previousagent responses included in the identified cluster. As long as theconfidence threshold is above a threshold value (e.g., above 60%), theprediction system 1050 may cause terminal device 1020 to display the topseveral (e.g., 5, 10, or any other number) previous agent responses withthe highest confidence percentages. Once a previous agent response isselected at terminal device 1020, the previous agent response may beautomatically transmitted to network device 1030 as part of the currentcommunication session. In some implementations, once a previous agentresponse is selected at terminal device 1020, once a previous agentresponse is selected, the selected response may be displayed at theterminal device 1020, and the selected response may be revised by theagent before being transmitted to network device 1030.

In some implementations, as messages are received at communicationserver 1010 (the messages being part of existing communicationsessions), the prediction system 1050 may automatically displayadditional data on terminal device 1020. For example, as the message isbeing entered at network device 1030, communication server 1010 (andthus, terminal device 1020) is receiving the text string of the messagein real-time. Prediction system 1050 may be continuously evaluating thereceived messages or the received portion of the message to determinequeries for databases to retrieve the additional data. Continuing withthe non-limiting example above, as communication server 1010 receivesthe message (or portions of the message in real-time) “Could you pleasehelp me with a technical issue I'm experiencing with the new ABC smartphone,” prediction system 1050 can continuously determine whether anyadditional data can be queried to support the agent in responding to themessage. In this example, even though network device 1030 iscommunicating with terminal device 1020 during the communicationsession, prediction system 1050 may query one or more databases (notshown) for additional data (e.g., technical specification,troubleshooting guides, and the like) associated with the ABC smartphone as the message is being typed at network device 1030 and/orreceived at communication server 1010, so that dynamically-changingadditional data is displayed at the terminal device 1020 as the messageis being typed at network device 1030. In some implementations, thisquerying occurs in real-time as the network device is communicating withthe terminal device, however, the present disclosure is not limitedthereto. The results of the querying are displayed at the terminaldevice in an effort to reduce the agent's need to perform the queryhimself or herself.

It will be appreciated that communication server 1010 can automaticallyperform a workflow based on the additional data retrieved after thequery. As a non-limiting example, during a communication session,network device 1030 may transmit a message indicating an issue. When themessage is received at communication server 1010, prediction system 1050can (in real-time) query one or more databases for data associated withthe issue. Further, prediction system 1050 can execute one or moreworkflows to automatically analyze the retrieved data. For example,prediction system 1050 can perform a standard deviation analysis on theretrieved data to determine the standard deviation of values included inthe data. Prediction system 1050 can automatically perform the one ormore workflows and display the retrieved data and/or the results ofanalyzing the retrieved data at terminal device 1020 so that the liveagent does not have to perform those queries and that analysis himselfor herself. In some implementations, the workflows may be user definedor may be automatically generated based on artificial intelligence ormachine learning techniques. Further, workflows may be associated withspecific content in messages, for example, specific terms in a message.If a message includes a particular term or phrase, prediction system1050 can access the workflow(s) associated with that particular term orphrase. The workflows can also be optimized or automatically modifiedbased on the results of a machine-learning analysis on historicalmessages from other network devices. For example, prediction system 1050can access message database 1040 (which is similar to message data store935) to evaluate other communications from other users. Predictionsystem 1050 can determine that other agents performed certain workflowson data provided by the user or access on behalf of the user for aparticular issue. Prediction system 1050 can then learn those workflowsand perform those workflows for users when future communications aredetermined to be associated with the particular issue. In someimplementations, a predicted message may not be exactly the same as orsimilar to a previous agent response included in a tagged cluster ofmessages, but rather, a predicated message can be constructed byquerying several systems and building the predicted message. Forexample, to generate a predicted response to the issue with ABC smartphone, prediction system 1050 can query a first database for technicaldocuments corresponding to ABC smart phone and a second database forvideo content data associated with ABC smart phone. The predictedresponse can be constructed by including text, along with the queriedtechnical documents and the queried video content data.

Machine-learning model 1060 may be a model that is generated using anartificial intelligence or machine learning technique. For example,machine-learning model 1060 may be a model that is generated usingsupervised, semi-supervised, or unsupervised machine-learningtechniques. As a non-limiting example, one or more clustering algorithmscan be used, such as K-means clustering, means-shift clustering,Density-Based Spatial Clustering of Applications with Noise (DBSCAN)clustering, Expectation-Maximization (EM) Clustering using GaussianMixture Models (GMM), and other suitable machine-learning algorithms, onthe database of messages stored in message data store 935. In someimplementations, machine-learning model 1060 may use support vectormachines (SVM), supervised, semi-supervised, or unsupervisedmachine-learning techniques to evaluate all previous messages to predictresponses to incoming messages received from network devices duringcommunication sessions.

FIG. 11 shows an example process 1100 for predicting agent responses.Each candidate message stored in message data store 935, for example,can correspond to a matrix that includes vector parameters associatedwith the message and/or associated with the communication session inwhich the message was transmitted. Examples of a vector parameter mayinclude the number of words in the message, the number of messagesexchanged in the communication session, the anchors used in themessages, the message parameters of the messages, and other suitableparameters. Each of these vector parameters can be stored in the matrixas a vector representation of that message and/or communication session.Matrices can be continuously updated as a communication session betweena network device and a terminal device continues and new messages areexchanged.

As a non-limiting example, a current chat conversation 1110 includingone or more messages exchanged between the user and the agent can alsobe transformed into a new message matrix 1120. Similarly, the newmessage matrix 1120 can include the number of words in the current chatconversation 1110, the words themselves, and the number of vectorparameters associated with the messages in the current chat conversation1110. In some implementations, the new message matrix 1120 cancontinuously be updated as new messages are entered into the chatconversation 1110. For example, each new message can be included in thenew message matrix 1120. Candidate message matrices 1130, 1140, and 1150can be generated and stored for each message (e.g., candidate message)stored in message data store 935.

Advantageously, the new message matrix 1120 can be dynamically updatedas the conversation between the user and the agent continues. The newmessage matrix 1120 can be compared against each candidate messagematrix (e.g., matrices 1130, 1140, and 1150). For example, the absolutevalue of the matrices can be compared and a similarity score can begenerated. The most similar candidate message matrix can be selected,and the candidate message corresponding to the selected candidatemessage matrix can be used as the predicted message that is displayed atthe agent's terminal device. For example, the matrix may include dataabout the message, including the number of characters in the message,the number of words in the message, the number of non-word characters inthe message, such as exclamation points and question marks, and othersuitable data. A value can be generated for each vector parameter of thematrices. In some implementations, the value can represent a severity orintensity of the vector parameter. For example, a value of 85 canrepresent a positive anchor included in the message, whereas, a value of−14 can represent a negative anchor included in the message.

FIG. 12 shows an example process 1200 for switching between a bot and aterminal device during a communication session with a network device. Atblock 1210, the bot can communicate with the network device associatedwith the user by exchanging one or more messages using an interface. Insome implementations, the bot can be selected from a plurality of bots.For example, each bot can be configured to perform a specific capability(e.g., assist with updating database records). A bot can be selectedfrom the plurality of bots based on the intent of the user (who may haveinitiated the communication session). The intent of the user can bedetermined by analyzing one or more messages transmitted by the user tothe communication server.

At block 1220, the communication server (which relays messages back andforth between the network device and the bot) can detect that a transferrule has been satisfied during the chat session. For example, a transferrule can be a threshold that determines when a chat session should behanded over to a live agent. For example, message parameter of theconversation between the bot and the user can be continuously monitoredand compared against the threshold. When the message parameter satisfiesthe threshold (e.g., equal to or less than, equal to or greater than,equal to, less than, greater than, and so on), the communication servercan determine that the transfer rule has been satisfied. In someimplementations, determining whether the transfer rule is satisfied canbe determined without a prompt from the user (e.g., without the userneeding to indicate that the user would like to communicate with a liveagent). In some implementations, the determining whether the transferrule is satisfied can be determined based on user input that satisfies acondition. For example, if the user indicates that he or she would likemore information about a new item (and uses the item name in a messageof the chat session), the item name can be detected, which satisfies thecondition that satisfies the transfer rule.

At block 1230, the communication server can initiate a hand over (e.g.,switch between the bot and the terminal device) of the chat session fromthe bot to a terminal device operated by a live agent. In someimplementations, initiating the hand over can include evaluating whichterminal device to select to communicate with the network device.Terminal devices can be grouped by specialty of the agent. In someexamples, the topic of the communication session between the bot and theuser can be used to select the terminal device. In other examples, theterminal device that is associated with (e.g., responsible for managing)the bot can be selected or notified of the hand over, and then theterminal device can seamlessly communicate with the user. In someexamples, when the chat session is handed over to the terminal device,the chat information, user information, and any other additionalinformation can be presented on the terminal device so that the agentcan easily assist the user. At block 1240, the communication server canfacilitate the chat session between the user and the terminal deviceassociated with the agent.

FIG. 13 shows an example process flow performed, at least in part, bythe communication server for executing end-to-end management of bots.Process flow 1300 can be performed, at least in part, by thecommunication server (e.g., communication server 1010). Process flow1300 can begin at block 1310 where bots and/or terminal devices areidentified for loading into the communication server. For example, botscan be treated the same as terminal devices by the communication server.

At block 1320, workflows can be defined for each of the bots andterminal devices identified in block 1310. For example, each bot can beassigned or configured to perform a specific capability. The workflow ortasks defined for the bot to perform can correspond to the capability ofthe bot. For example, roles and responsibilities can be defined for thebot (e.g., the bot handles address updates, password updates, assistingwith user information). Bot task-management can include routing messagesreceived from network devices to terminal devices or bots, as describedherein.

At block 1330, routing protocols can be defined for routing messages toand from the bots. For example, the communication server can execute therouting protocols to determining which messages from users are to berouted to the bot, escalation paths (e.g., from bot, to live agent, tosupervisor), specific campaigns that define when to trigger botcommunication and when to trigger live agent communication, and so on.

At block 1340, the task-completion parameters (e.g., performancemetrics) of the bot can be evaluated by generating quality scores foreach bot. In some implementations, the performance of the bot can beevaluated by assessing the message parameters (e.g., meaningfulconnection score (MCS) score) associated with the bot. For example, ifusers have consistently been frustrated with a particular bot, themessage parameter associated with the bot may be low. A low messageparameter may indicate that the bot should be reprogrammed or takenoffline. At block 1350, protocols for communicating with users can beenhanced. For example, bots can be reprogrammed, or bots can bedecommissioned if the bots no longer serve a purpose (e.g., specializedcapabilities are no longer needed). Enhancing a protocol forcommunication with users can include modifying the bot script that isexecuted to implement the autonomous bot, optimizing a feature or aspectof the bot, such as improving routing protocols, or communicationscripts, and other suitable enhancements.

Specific details are given in the above description to provide athorough understanding of the embodiments. However, it is understoodthat the embodiments can be practiced without these specific details.For example, circuits can be shown as block diagrams in order not toobscure the embodiments in unnecessary detail. In other instances,well-known circuits, processes, algorithms, structures, and techniquescan be shown without unnecessary detail in order to avoid obscuring theembodiments.

Implementation of the techniques, blocks, steps and means describedabove can be done in various ways. For example, these techniques,blocks, steps and means can be implemented in hardware, software, or acombination thereof. For a hardware implementation, the processing unitscan be implemented within one or more application specific integratedcircuits (ASICs), digital signal processors (DSPs), digital signalprocessing devices (DSPDs), programmable logic devices (PLDs), fieldprogrammable gate arrays (FPGAs), processors, controllers,micro-controllers, microprocessors, other electronic units designed toperform the functions described above, and/or a combination thereof.

Also, it is noted that portions of the embodiments can be described as aprocess which is depicted as a flowchart, a flow diagram, a data flowdiagram, a structure diagram, or a block diagram. Although a flowchartcan describe the operations as a sequential process, many of theoperations can be performed in parallel or concurrently. In addition,the order of the operations can be re-arranged. A process is terminatedwhen its operations are completed, but could have additional steps notincluded in the figure. A process can correspond to a method, afunction, a procedure, a subroutine, a subprogram, etc. When a processcorresponds to a function, its termination corresponds to a return ofthe function to the calling function or the main function.

Furthermore, embodiments can be implemented by hardware, software,scripting languages, firmware, middleware, microcode, hardwaredescription languages, and/or any combination thereof. When implementedin software, firmware, middleware, scripting language, and/or microcode,the program code or code segments to perform the necessary tasks can bestored in a machine readable medium such as a storage medium. A codesegment or machine-executable instruction can represent a procedure, afunction, a subprogram, a program, a routine, a subroutine, a module, asoftware package, a script, a class, or any combination of instructions,data structures, and/or program statements. A code segment can becoupled to another code segment or a hardware circuit by passing and/orreceiving information, data, arguments, parameters, and/or memorycontents. Information, arguments, parameters, data, etc. can be passed,forwarded, or transmitted via any suitable means including memorysharing, message passing, ticket passing, network transmission, etc.

For a firmware and/or software implementation, the methodologies can beimplemented with modules (e.g., procedures, functions, and so on) thatperform the functions described herein. Any machine-readable mediumtangibly embodying instructions can be used in implementing themethodologies described herein. For example, software codes can bestored in a memory. Memory can be implemented within the processor orexternal to the processor. As used herein the term “memory” refers toany type of long term, short term, volatile, nonvolatile, or otherstorage medium and is not to be limited to any particular type of memoryor number of memories, or type of media upon which memory is stored.

Moreover, as disclosed herein, the term “storage medium”, “storage” or“memory” can represent one or more memories for storing data, includingread only memory (ROM), random access memory (RAM), magnetic RAM, corememory, magnetic disk storage mediums, optical storage mediums, flashmemory devices and/or other machine readable mediums for storinginformation. The term “machine-readable medium” includes, but is notlimited to portable or fixed storage devices, optical storage devices,wireless channels, and/or various other storage mediums capable ofstoring that contain or carry instruction(s) and/or data.

While the principles of the disclosure have been described above inconnection with specific apparatuses and methods, it is to be clearlyunderstood that this description is made only by way of example and notas limitation on the scope of the disclosure.

What is claimed is:
 1. A computer-implemented method, comprising:collecting a data set for training a machine-learning model to predictresponse messages, wherein collecting the data set includes storing oneor more previous messages included in a previous communication sessionbetween a network device and a terminal device associated with an agent;facilitating a communication session between a terminal device and anetwork device, wherein the communication session enables the terminaldevice and the network device to exchange one or more messages;receiving a new message during the communication session; evaluating thenew message using the trained machine-learning model, wherein evaluatingthe new message includes evaluating any messages exchanged before thenew message was received; predicting a response to the new message,wherein predicting the response includes using a result of theevaluation to determine which previous message to select from the dataset as the predicted response to the new message; and facilitatingdisplaying the predicted response at the terminal device, wherein whenthe predicted response is selected, the predicted response isautomatically transmitted to the network device during the communicationsession.
 2. The computer-implemented method of claim 1, furthercomprising: identifying an attribute associated with a previous messageincluded in the data set; appending an attribute tag to the previousmessage, wherein the attribute tag corresponds to the identifiedattribute; and training the machine-learning model using the attributetag.
 3. The computer-implemented method of claim 1, wherein thecommunication session between the terminal device and the network deviceincludes a bot, wherein the bot is configured to autonomouslycommunicate with the network device.
 4. The computer-implemented methodof claim 3, further comprising: evaluating the new message using thebot, wherein evaluating the new message includes automaticallyidentifying a query from the new message, and wherein the new message isevaluated in real-time as the new message is received; querying adatabase using the identified query; and displaying one or more resultsof the querying at the terminal device.
 5. The computer-implementedmethod of claim 1, wherein the machine-learning model includes arecurrent neural network (RNN) or a convolutional neural network (CNN).6. The computer-implemented method of claim 1, wherein determining thepredicted response message further comprises: generating a vectorrepresentation of the new message; using the machine-learning model tocompare the vector representation of the new message to an additionalvector representation of the one or more previous messages included inthe data set; and selecting a previous message from the one or moreprevious messages included in the data set, wherein the previous messageis selected based on the comparison.
 7. The computer-implemented methodof claim 1, further comprising: generating a matrix for a candidatemessage, wherein the matrix includes a number of words included in theprevious message and a vector representation of the previous message;generating an additional matrix for the new message, wherein theadditional matrix includes a number of words included in the new messageand a vector representation of the new message; and comparing the matrixwith the additional matrix to determine whether to select the previousmessage as the predicted response.
 8. A system, comprising: one or moredata processors; and a non-transitory computer-readable storage mediumcontaining instructions which, when executed on the one or more dataprocessors, cause the one or more data processors to perform operationsincluding: collecting a data set for training a machine-learning modelto predict response messages, wherein collecting the data set includesstoring one or more previous messages included in a previouscommunication session between a network device and a terminal deviceassociated with an agent; facilitating a communication session between aterminal device and a network device, wherein the communication sessionenables the terminal device and the network device to exchange one ormore messages; receiving a new message during the communication session;evaluating the new message using the trained machine-learning model,wherein evaluating the new message includes evaluating any messagesexchanged before the new message was received; predicting a response tothe new message, wherein predicting the response includes using a resultof the evaluation to determine which previous message to select from thedata set as the predicted response to the new message; and facilitatingdisplaying the predicted response at the terminal device, wherein whenthe predicted response is selected, the predicted response isautomatically transmitted to the network device during the communicationsession.
 9. The system of claim 8, wherein the operations furthercomprise: identifying an attribute associated with a previous messageincluded in the data set; appending an attribute tag to the previousmessage, wherein the attribute tag corresponds to the identifiedattribute; and training the machine-learning model using the attributetag.
 10. The system of claim 8, wherein the communication sessionbetween the terminal device and the network device includes a bot,wherein the bot is configured to autonomously communicate with thenetwork device.
 11. The system of claim 10, further comprising:evaluating the new message using the bot, wherein evaluating the newmessage includes automatically identifying a query from the new message,and wherein the new message is evaluated in real-time as the new messageis received; querying a database using the identified query; anddisplaying one or more results of the querying at the terminal device.12. The system of claim 8, wherein the machine-learning model includes arecurrent neural network (RNN) or a convolutional neural network (CNN).13. The system of claim 8, wherein predicting the response furthercomprises: generating a vector representation of the new message; usingthe machine-learning model to compare the vector representation of thenew message to an additional vector representation of the one or moreprevious messages included in the data set; and selecting a previousmessage from the one or more previous messages included in the data set,wherein the previous message is selected based on the comparison. 14.The system of claim 8, wherein the operations further comprise:generating a matrix for a candidate message, wherein the matrix includesa number of words included in the previous message and a vectorrepresentation of the previous message; generating an additional matrixfor the new message, wherein the additional matrix includes a number ofwords included in the new message and a vector representation of the newmessage; and comparing the matrix with the additional matrix todetermine whether to select the previous message as the predictedresponse.
 15. A computer-program product tangibly embodied in anon-transitory machine-readable storage medium, including instructionsconfigured to cause a data processing apparatus to perform operationsincluding: collecting a data set for training a machine-learning modelto predict response messages, wherein collecting the data set includesstoring one or more previous messages included in a previouscommunication session between a network device and a terminal deviceassociated with an agent; facilitating a communication session between aterminal device and a network device, wherein the communication sessionenables the terminal device and the network device to exchange one ormore messages; receiving a new message during the communication session;evaluating the new message using the trained machine-learning model,wherein evaluating the new message includes evaluating any messagesexchanged before the new message was received; predicting a response tothe new message, wherein predicting the response includes using a resultof the evaluation to determine which previous message to select from thedata set as the predicted response to the new message; and facilitatingdisplaying the predicted response at the terminal device, wherein whenthe predicted response is selected, the predicted response isautomatically transmitted to the network device during the communicationsession.
 16. The computer-program product of claim 15, wherein theoperations further comprise: identifying an attribute associated with aprevious message included in the data set; appending an attribute tag tothe previous message, wherein the attribute tag corresponds to theidentified attribute; and training the machine-learning model using theattribute tag.
 17. The computer-program product of claim 15, wherein thecommunication session between the terminal device and the network deviceincludes a bot, wherein the bot is configured to autonomouslycommunicate with the network device.
 18. The computer-program product ofclaim 17, further comprising: evaluating the new message using the bot,wherein evaluating the new message includes automatically identifying aquery from the new message, and wherein the new message is evaluated inreal-time as the new message is received; querying a database using theidentified query; and displaying one or more results of the querying atthe terminal device.
 19. The computer-program product of claim 15,wherein the machine-learning model includes a recurrent neural network(RNN) or a convolutional neural network (CNN).
 20. The computer-programproduct of claim 15, wherein predicting the response further comprises:generating a vector representation of the new message; using themachine-learning model to compare the vector representation of the newmessage to an additional vector representation of the one or moreprevious messages included in the data set; and selecting a previousmessage from the one or more previous messages included in the data set,wherein the previous message is selected based on the comparison.